a) Field of the Invention
The invention is directed to a method for determining the edge position in color images, particularly with detection of color transitions and intensity transitions in color space F.
b) Description of the Related Art
The prior art discloses methods for determining the location of edges based on analysis of a one-dimensional gray value curve (g) along a sampling straight line (x). Typical gray value curves g(x) are dark-light transitions, light-dark transitions, light bars and dark bars. The edge finding is based on analyzing these gray value curves and obtaining position information which describes the position of the actual edge exactly with respect to pixels or subpixels. Transfer to two-dimensional and three-dimensional image structures is carried out with any quantity of sampling straight lines in the plane g(x, y) or in the space g(x, y, z).
This edge finding accordingly presupposes that only one function value, the gray value g, can change within the image or, in other words, edge finding is only applicable to gray images. Color images do not meet this precondition because with color images three function values, e.g., the primary color values red R (x, y), green G (x, y) and blue B (x, y), can change depending on location.
In order to find edge locations in color images in spite of this, previous methods made use of transformation of the color image to a gray image. For this purpose, the gray value was typically determined corresponding to the basic equation of color television technology Y=0.3 R+0.5 G+0.1 B. Further, it is also possible to apply the known algorithms to the individual color extracts R, G, B.
With these methods, edge locations can be determined in the gray image Y (x, y) generated from a color image R (x, y), green G (x, y) and blue B (x, y) by means of the above-mentioned transformation as well as in every individual color extract. However, this method is deficient in that the edge locations found in the gray image or in individual color extracts generally do not coincide. Therefore, the actual edge cannot be exactly determined.
It is the primary object of the invention to provide a method of the type mentioned above in which the edge locations found in the total image or in individual color extracts coincide as closely as possible.
In accordance with the invention, this object is met by a method for determining the edge positions in color images, particularly with detection of color transitions and intensity transitions in a color space F. The steps of the method comprise changing every color value Fi=(X1i, X2i, X3i)TF to a vector representation {overscore (OFi)} proceeding from a selected point O=(O1, O2, O3)T of the color space F to determine the edge location K; and determining the transition from a color FL at the left of edge K to a color FR at the right of edge K in order to determine the edge position along a given sampling direction by a method based on the vector representation {overscore (OFi)}.
The method is based on the application and examination of the processes in real image data in which the spacing of two colors is greatest at the edge.
The cross-product |{overscore (OFi)}xc3x97{overscore (OFi+1)}|, which corresponds to the plotted parallelogram surface of vectors {overscore (OFi)}xc3x97{overscore (OFi+1)}, is a measure for the vectorial distance between two colors.
By means of the operation according to the invention, the edge function is directly generated in the color image. Along a given sampling straight line, the scalar product of the two associated spatial vectors is determined in the RGB color space between every point Pn (Rn, Gn, Bn) and its successor Pn+1 (Rn+1, Gn+1, Bn+1). Accordingly, a one-dimensional function curve occurs along the sampling straight line. All known methods for determining edge location in an exact manner with respect to pixels or subpixels from a given gray value curve can be applied to this one-dimensional function curve. According to the invention, only one individual edge location is also detected along a search ray in the color image. This conforms to the actual body edge.
Instead of the scalar product, the vectorial product can also be utilized for edge finding. For this purpose, according to the invention, the vectorial product of the two associated location vectors in the color space is determined along a predetermined sampling straight line in every point Pn (Rn, Gn, Bn) and its successor Pn+1 (Rn+1, Gn+1, Bn+). In addition to the information about the actual edge location, the vectorial calculation also provides information through the given direction of the resulting vector in space about whether the given sampling direction is an ascending edge or a descending edge.
The invention is described more fully in the following example.